#define _CRT_SECURE_NO_WARNINGS 1
#pragma once

#include "Common.hpp"

class PageCache
{
public:
	static PageCache* GetInstance()
	{
		return &_sInst;
	}

	Span* NewSpan(size_t k);
private:
	SpanList _spanLists[NPAGES];

public:
	std::mutex _pageMtx;
private:
	PageCache()
	{}
	PageCache(const PageCache&) = delete;

	static PageCache _sInst;
};